<?
include_once('config.php');
include_once('model/friend_requests.php');

if (isset($_GET["id"])){
	$user_id = $_GET["id"];
	
	$requests = new FriendRequests();
	$requests->requester_id = Session::user()->id;
	$requests->requestee_id = $user_id;
	$requests->insert();
	
	header("Location: info.php?id=$user_id");
}
else
	header("Location: all_uers.php");
?>